// 存放和用户相关的请求
// 登录、注册、换头像、重置密码

import request from '@/utils/request'

// 注册方法
export function regAPI(body) {
  // body = {username:'',password:'',repassword:''}
  return request.post('/api/reg', body)
}

// 登录请求
export const loginAPI = obj => {
  return request.post('/api/login', obj)
}

// 获取用户信息
export const getUserAPI = () => {
  // request.get('接口地址',{配置项})
  // return request.get('/my/userinfo', {
  //   headers: {
  //     // Authorization:token值
  //     Authorization: store.state.user.token
  //   }
  // })
  return request.get('/my/userinfo')
}
